package com.lds.register.center.server.common.enums;

import com.lds.management.center.common.enums.ErrCodeEnum;

public enum ServerErrorEnum implements ErrCodeEnum {

    SYSTEM_ERROR("SYSTEM_ERROR", "系统错误"),
    INVALID_PARAM("INVALID_PARAM", "参数不合法"),


    CLUSTER_USING("CLUSTER_USING", "集群正在被使用"),
    APP_USING("APP_USING", "应用正在被使用"),
    NAMESPACE_USING("NAMESPACE_USING", "配置文件正在被使用"),

    ENV_NOT_EXIST("ENV_NOT_EXIST", "环境不存在"),
    CLUSTER_NOT_EXIST("CLUSTER_NOT_EXIST", "集群不存在"),
    APP_NOT_EXIST("APP_NOT_EXIST", "应用不存在"),
    NAMESPACE_NOT_EXIST("NAMESPACE_NOT_EXIST", "配置文件不存在"),
    ;

    private final String code;
    private final String message;

    ServerErrorEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getErrCode() {
        return code;
    }

    @Override
    public String getErrMsg() {
        return message;
    }

}
